import {
	createRouter,
	createWebHistory
} from 'vue-router'
import Login from '../views/Login.vue'
import Home from '../views/Home.vue'
import List from '../views/Sys/List.vue'
import Yaopin from '../views/Sys/Yaopin.vue'
import Yaopinlx from '../views/Sys/Yaopinlx.vue'
import Fayao from '../views/Sys/Fayao.vue'
import Tuiyao from '../views/Sys/Tuiyao.vue'
import Dept from '../views/Sys/Dept.vue'
import Doctor from '../views/Sys/Doctor.vue'
import Cons from '../views/Sys/Cons.vue'
const routes = [{
		path: '/',
		redirect: '/login'
	},
	{
		path: '/login',
		name: 'Login',
		component: Login
	},
	{
		path: '/home',
		name: 'Home',
		component: Home,
		redirect: '/home/yaopin',
		children: [{
			path: '/home/list',
			component: List
		},{
			path: '/home/yaopin',
			component: Yaopin
		},{
			path: '/home/yaopinlx',
			component: Yaopinlx
		},
		{
			path: '/home/fayao',
			component: Fayao
		},
		{
			path: '/home/tuiyao',
			component: Tuiyao
		},
		{
			path: '/home/dept',
			component: Dept
		},
		{
			path: '/home/doctor',
			component: Doctor
		},
		{
			path: '/home/cons',
			component: Cons
		},
	 ]
	}
]

const router = createRouter({
	 history: createWebHistory(process.env.BASE_URL),
	 routes
})

export default router
